You are here: Symbol Reference > Dew Namespace > Dew.Stats Namespace > Dew.Stats.Units Namespace > Classes > Statistics Class > Statistics Methods > Statistics.InterQuartile Method
Dew Stats for .NET
ContentsIndexHome
PreviousUpNext
Statistics.InterQuartile Method

InterQuartile range.

Syntax
C#
Visual Basic
public static double InterQuartile([In] TVec X, TPercentileMethod Method);
Parameters 
Description 
[In] TVec X 
Data. An exception is raised if X is complex. 
TPercentileMethod Method 
Defines one of the available methods for calculating percentile. Software packages use different methods to calculate percentiles. For example, Excel uses pctMethodNMinus, while on the other hand, NCSS's default method is pctMethodNPlus. 

the interquartile range of all X vector elements. The interquartile range is defined as a difference between 75th percentile and 25th percentile of given values.

Calculate the IQR for given values.

using Dew.Math; using Dew.Stats.Units; using Dew.Stats; namespace Dew.Examples { private void Example() { Vector a = new Vector(0); a.SetIt(false, new double[] {2,0.1,3,4}); double res = Statistics.InterQuartile(a,TPercentileMethod.pctMethodNMinus); // Res = 1.725 //Excel convention } }
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!